#ifndef __CE_SCENE_SKYBOX_H__
#define __CE_SCENE_SKYBOX_H__

#include <engine.h>
#include <scene/entitynode.h>
#include <scene/ianimator.h>


class CE_API ceAbstractSky : public ceEntityNode
{
  CE_OBJECT
private:
  class SkyAnimator : public iAnimator
  {
    CE_OBJECT
  public:
    SkyAnimator ();
    void Animate (ceNode* node, ceRenderEnvironment& env);
  };

  SkyAnimator *_animator;


protected:
  ceAbstractSky ();
  virtual ~ceAbstractSky ();

  bool Initialize (iDevice* device);
  virtual ceRef<ceMesh> CreateMesh (iDevice* device) = 0;
};

class CE_API ceSkyBox : public ceAbstractSky
{
private:
  ceVector3f _dimension;

public:
  ceSkyBox();

  bool Initialize (iDevice* device, const ceVector3f& dimensions);

  ceRef<ceMesh> CreateMesh(iDevice* device);

};


class CE_API ceSkySphere : public ceAbstractSky
{
private:
  float     _radius;
  unsigned  _details;

public:
  ceSkySphere();

  bool Initialize (iDevice* device, float radius, unsigned details = 16);

  ceRef<ceMesh> CreateMesh(iDevice* device);

};

#endif // SKYBOX_H
